
package domain

import (
	//"github.com/jsix/gof"
)

type DomainError struct {
	Key          string
	DefaultError string
}

func NewDomainError(key string, msg string) *DomainError {
	return &DomainError{
		Key:          key,
		DefaultError: msg,
	}
}

func (this *DomainError) Error() string {
	return this.DefaultError
}

func (this *DomainError) Set(msg string) {
	this.DefaultError = msg
}
